Skip to content

docs: promote AGENTS.md to canonical and import it from CLAUDE.md#66

Merged
jack-arturo merged 3 commits into
mainfrom
docs/agents-md-canonical
Jun 6, 2026
Merged

docs: promote AGENTS.md to canonical and import it from CLAUDE.md#66
jack-arturo merged 3 commits into
mainfrom
docs/agents-md-canonical

Conversation

@jack-arturo

Copy link
Copy Markdown
Member

What & why

Adopts the house standard for agent-direction files and freshens the content against the current code.

The standard: AGENTS.md is the single source of truth; CLAUDE.md is one line — @AGENTS.md — that imports it. Only Claude Code resolves the import; every other agent (Cursor, Codex, etc.) reads AGENTS.md's literal bytes. Token-neutral, and it kills drift between the two files.

Honest framing: this is not fixing a live two-file divergence. An AGENTS.md existed in the working tree but was gitignored and untracked — so it never shipped, and the only doc the repo actually carried was a 65-line CLAUDE.md. This PR un-ignores AGENTS.md, promotes it to canonical (freshened against code), and points CLAUDE.md at it via the import. Net effect: every agent — not just Claude Code — now gets an accurate, tracked project guide.

Commits, reviewed separately

  1. docs: track AGENTS.md and make CLAUDE.md import it — mechanical: drop AGENTS.md from .gitignore, track it, and replace CLAUDE.md with the bare @AGENTS.md import.
  2. docs: add canonical AGENTS.md freshened against code — the freshness rewrite (every factual claim grounded in code, with path:line citations).

What was re-verified against code

  • 16 toggl_ tools, all prefixed toggl_ (tools array in src/index.ts; server.json lists the same 16). Reflects v1.1.0.
  • Auth precedence TOGGL_API_KEY || TOGGL_API_TOKEN || TOGGL_TOKEN (src/index.ts:127), value .trim()-ed, exits if none set (src/index.ts:131-135); legacy aliases log a deprecation warning.
  • No TOGGL_WORKSPACE_ID var — the default-workspace var is TOGGL_DEFAULT_WORKSPACE_ID (src/index.ts:148). Optional cache vars: TOGGL_CACHE_TTL=3600000, TOGGL_CACHE_SIZE=1000, TOGGL_BATCH_SIZE=100 (src/index.ts:143-145).
  • HTTP Basic auth with the token as username and the literal api_token as password (src/toggl-api.ts:63) — not a bearer token.
  • Test runner is Vitest (vitest run), not Jest; HTTP is mocked so the suite needs no Toggl credentials.
  • 7-file src/ including timeline.ts and workspace.ts (both omitted from the old CLAUDE.md).

Verification limits

The automated checks (tool names/count exist, env vars exist, referenced paths/scripts exist, CLAUDE.md is exactly @AGENTS.md, both files tracked, AGENTS.md un-ignored) catch mechanical drift only — not judgment staleness. Please read the diff for whether the advice and emphasis are still right.

🤖 Generated with Claude Code

jack-arturo and others added 2 commits June 6, 2026 14:06
Un-ignore AGENTS.md (was in .gitignore) and reduce CLAUDE.md to the bare
`@AGENTS.md` import so the canonical guide is tracked and the two files
can't drift.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Promote AGENTS.md to the single source of truth, re-verified against code:
16 toggl_ tools, TOGGL_API_KEY||TOGGL_API_TOKEN||TOGGL_TOKEN auth aliases,
TOGGL_DEFAULT_WORKSPACE_ID (not TOGGL_WORKSPACE_ID), Vitest, 7-file src/,
Basic auth (token:api_token).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Promotes AGENTS.md to the canonical, tracked agent-guidance document and reduces CLAUDE.md to an import stub so multiple agent tools can share a single source of truth without drift.

Changes:

  • Replace the existing multi-section CLAUDE.md with a single @AGENTS.md import.
  • Add a comprehensive, code-referenced AGENTS.md as the canonical guidance document.
  • Stop ignoring AGENTS.md so it is tracked in git.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

File Description
CLAUDE.md Replaced with a one-line import of AGENTS.md to avoid duplicated guidance.
AGENTS.md Added canonical agent instructions (commands, architecture, tools, env vars, CI) aligned to current repo state.
.gitignore Removed AGENTS.md from ignore rules so it can be committed/tracked.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread AGENTS.md Outdated
ensureCache (src/index.ts:159) sets cacheWarmed=true even when it cannot
resolve a workspace, so it only pre-warms project/client/tag data when a
workspace is resolvable (TOGGL_DEFAULT_WORKSPACE_ID or a single workspace).
With multiple workspaces and no default, entities are fetched lazily instead.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@jack-arturo jack-arturo marked this pull request as ready for review June 6, 2026 14:08
@jack-arturo jack-arturo merged commit f5f2a34 into main Jun 6, 2026
10 checks passed
@jack-arturo jack-arturo deleted the docs/agents-md-canonical branch June 6, 2026 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants